/**
 * 首页相关api调用
 */

import {get, post } from '../../request'


//百科问答首页列表
export const getRequestion = (params) => get("/home/question", params);

//查看百科问答详情页

export const getDetailById = (id) => get("/" + id);

//获得当前问题下的所有回答列表

export const getAnwser = (params) => get("/home/noF/reply", params);

//获取当前回答下面的评论信息

export const getAnwserListRes = (params) => get("/home/noF/comment", params);

//添加回答
export const addAnwser = (params) => post("/home/reply", params);

//给回答添加评论
export const addAnwserRep = (params) => post("/home/comment", params);

//点赞
export const likeCount = (params) => post("/home/rpLike", params);

//取消点赞
export const likeCountSub = (params) => post("/home/unRpLike", params);

//查询当前用户是否对回答点赞
export const getLikeStatusById = (params) => get("/home/rpLike", params);

export const getRequestionList = (params) => get("/home/noF/question", params);

export const submitRequestion = (params) => post("/home/question", params);

//根据id查询问题详情

export const getRequestionById = (params) => get("/home/noF/question/" + params.qtId);